package com.shunli.cterminal.model.req;

import com.examples.core.validation.constraints.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shunli.cterminal.enums.TfGoodsCodeEnum;
import com.shunli.cterminal.model.code.CterminalResultCode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

import static com.examples.core.tool.utils.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @ClassName: H5OrderCrtReq
 * @Description: TODO
 * @Author: DAIYALU
 * @Date: 2024/11/9
 * @Version: 1.0
 */
@Data
public class H5OrderCrtReq {

    @Schema(description = "手机号码")
    private String phone;

    @Schema(description = "推广域名")
    @NotBlank(message = CterminalResultCode.PARAMS_EMPTY)
    private String domainName;

    @Schema(description = "商品编码")
    @EnumValue(enumClazz = TfGoodsCodeEnum.class, message = CterminalResultCode.PARAMS_EMPTY)
    private String goodsType;

    @Schema(description = "模板ID")
    @NotBlank(message = CterminalResultCode.PARAMS_EMPTY)
    private String tgTemp;

    @Schema(description = "使用红包 0-不使用 1-使用")
    private String isUseRedbag;

    @Schema(description = "UID")
    @NotBlank(message = CterminalResultCode.PARAMS_EMPTY)
    private String uid;

    @Schema(description = "推广信息")
    private String tgPar;

    @Schema(description = "下单系统(iso,windows,android)")
    private String system;

    @Schema(description = "下单IP")
    private String userIp;

    @Schema(description = "用户名")
    private String userName;
    @Schema(description = "性别 0-女 1-男 2-未知")
    private Integer sex;
    @Schema(description = "生日")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime birthday;

    private String firstName;
    private String isBirth;

    @Schema(description = "日期类型：0-公历(阳历)，1-阴历(农历)，2-国历")
    private Integer isLunar;

    private String woName;
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime wbirthday;
    private String taName;
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime tbirthday;

    private String businessType;
    private String areaFname;
    private String hangyeLname;
}
